package com.navinfo.opentsp.platform.computing.dto;//package com.navinfo.opentsp.platform.computing.dto;
//
//
//import com.navinfo.opentsp.platform.location.protocol.common.LCPredictiveMaintenance;
//import com.navinfo.platform.bigdata.util.EntityConvert;
//
//public class MaintenanceEvent3Dto {
//    private double mileage;                   //里程
//    private double speed;                   //车速
//    private int clutchSwitch;           //离合器开关
//    private int neutralSwitch;           //空挡开关
//    private long engineTorque;      //发动机扭矩
//    private long flywheelTorque;      //飞轮扭矩
//    private double rotation;             //发动机转速
//    private double maxRotation2;         //最高转速
//    private int gearPosition2;         //档位
//    private double synchronisedTime2;  //同步时间
//    private long startingEnergy2;      //起步能量
//    private double maxRotation3;    //最高转速
//    private int gearPosition3;         //档位
//    private double synchronisedTime3;  //同步时间
//    private long shiftEnergy3;      //换挡能量
//
//    public double getMileage() {
//        return mileage;
//    }
//
//    public void setMileage(double mileage) {
//        this.mileage = mileage;
//    }
//
//    public double getSpeed() {
//        return speed;
//    }
//
//    public void setSpeed(double speed) {
//        this.speed = speed;
//    }
//
//    public int getClutchSwitch() {
//        return clutchSwitch;
//    }
//
//    public void setClutchSwitch(int clutchSwitch) {
//        this.clutchSwitch = clutchSwitch;
//    }
//
//    public int getNeutralSwitch() {
//        return neutralSwitch;
//    }
//
//    public void setNeutralSwitch(int neutralSwitch) {
//        this.neutralSwitch = neutralSwitch;
//    }
//
//    public long getEngineTorque() {
//        return engineTorque;
//    }
//
//    public void setEngineTorque(long engineTorque) {
//        this.engineTorque = engineTorque;
//    }
//
//    public long getFlywheelTorque() {
//        return flywheelTorque;
//    }
//
//    public void setFlywheelTorque(long flywheelTorque) {
//        this.flywheelTorque = flywheelTorque;
//    }
//
//    public double getRotation() {
//        return rotation;
//    }
//
//    public void setRotation(double rotation) {
//        this.rotation = rotation;
//    }
//
//    public double getMaxRotation2() {
//        return maxRotation2;
//    }
//
//    public void setMaxRotation2(double maxRotation2) {
//        this.maxRotation2 = maxRotation2;
//    }
//
//    public int getGearPosition2() {
//        return gearPosition2;
//    }
//
//    public void setGearPosition2(int gearPosition2) {
//        this.gearPosition2 = gearPosition2;
//    }
//
//    public double getSynchronisedTime2() {
//        return synchronisedTime2;
//    }
//
//    public void setSynchronisedTime2(double synchronisedTime2) {
//        this.synchronisedTime2 = synchronisedTime2;
//    }
//
//    public long getStartingEnergy2() {
//        return startingEnergy2;
//    }
//
//    public void setStartingEnergy2(long startingEnergy2) {
//        this.startingEnergy2 = startingEnergy2;
//    }
//
//    public double getMaxRotation3() {
//        return maxRotation3;
//    }
//
//    public void setMaxRotation3(double maxRotation3) {
//        this.maxRotation3 = maxRotation3;
//    }
//
//    public int getGearPosition3() {
//        return gearPosition3;
//    }
//
//    public void setGearPosition3(int gearPosition3) {
//        this.gearPosition3 = gearPosition3;
//    }
//
//    public double getSynchronisedTime3() {
//        return synchronisedTime3;
//    }
//
//    public void setSynchronisedTime3(double synchronisedTime3) {
//        this.synchronisedTime3 = synchronisedTime3;
//    }
//
//    public long getShiftEnergy3() {
//        return shiftEnergy3;
//    }
//
//    public void setShiftEnergy3(long shiftEnergy3) {
//        this.shiftEnergy3 = shiftEnergy3;
//    }
//
//    public static MaintenanceEvent3Dto parseProto(LCPredictiveMaintenance.MaintenanceEvent3 maintenanceEvent3){
//        MaintenanceEvent3Dto maintenanceEvent3Dto = new MaintenanceEvent3Dto();
//        maintenanceEvent3Dto.setMileage(maintenanceEvent3.getMileage());
//        maintenanceEvent3Dto.setSpeed(maintenanceEvent3.getSpeed());
//        maintenanceEvent3Dto.setClutchSwitch(maintenanceEvent3.getClutchSwitch());
//        maintenanceEvent3Dto.setNeutralSwitch(maintenanceEvent3.getNeutralSwitch());
//        maintenanceEvent3Dto.setEngineTorque(maintenanceEvent3.getEngineTorque());
//        maintenanceEvent3Dto.setFlywheelTorque(maintenanceEvent3.getFlywheelTorque());
//        maintenanceEvent3Dto.setRotation(maintenanceEvent3.getRotation());
//        maintenanceEvent3Dto.setMaxRotation2(maintenanceEvent3.getMaxRotation2());
//        maintenanceEvent3Dto.setGearPosition2(maintenanceEvent3.getGearPosition2());
//        maintenanceEvent3Dto.setSynchronisedTime2(maintenanceEvent3.getSynchronisedTime2());
//        maintenanceEvent3Dto.setStartingEnergy2(maintenanceEvent3.getStartingEnergy2());
//        maintenanceEvent3Dto.setMaxRotation3(maintenanceEvent3.getMaxRotation3());
//        maintenanceEvent3Dto.setGearPosition3(maintenanceEvent3.getGearPosition3());
//        maintenanceEvent3Dto.setSynchronisedTime3(maintenanceEvent3.getSynchronisedTime3());
//        maintenanceEvent3Dto.setShiftEnergy3(maintenanceEvent3.getShiftEnergy3());
//        return maintenanceEvent3Dto;
//    }
//
//    /**
//     * 解析成String拼接字符串
//     * @param maintenanceEvent3
//     * @return
//     */
//    public static String parseString(LCPredictiveMaintenance.MaintenanceEvent3 maintenanceEvent3){
//        return EntityConvert.convert(
//                maintenanceEvent3.getMileage(),
//                maintenanceEvent3.getSpeed(),
//                maintenanceEvent3.getClutchSwitch(),
//                maintenanceEvent3.getNeutralSwitch(),
//                maintenanceEvent3.getEngineTorque(),
//                maintenanceEvent3.getFlywheelTorque(),
//                maintenanceEvent3.getRotation(),
//                maintenanceEvent3.getMaxRotation2(),
//                maintenanceEvent3.getGearPosition2(),
//                maintenanceEvent3.getSynchronisedTime2(),
//                maintenanceEvent3.getStartingEnergy2(),
//                maintenanceEvent3.getMaxRotation3(),
//                maintenanceEvent3.getGearPosition3(),
//                maintenanceEvent3.getSynchronisedTime3(),
//                maintenanceEvent3.getShiftEnergy3());
//    }
//
//    /**
//     * 反解析成PB对象
//     * @param str
//     * @return
//     */
//    public static LCPredictiveMaintenance.MaintenanceEvent3 parsePB(String str){
//        LCPredictiveMaintenance.MaintenanceEvent3.Builder builder = null;
//
//        try{
//            String[] revert = EntityConvert.revert(str);
//            if(null!=revert && revert.length>=15){
//                builder = LCPredictiveMaintenance.MaintenanceEvent3.newBuilder();
//                builder.setMileage(Double.valueOf(revert[0]));
//                builder.setSpeed(Double.valueOf(revert[1]));
//                builder.setClutchSwitch(Integer.valueOf(revert[2]));
//                builder.setNeutralSwitch(Integer.valueOf(revert[3]));
//                builder.setEngineTorque(Long.valueOf(revert[4]));
//                builder.setFlywheelTorque(Long.valueOf(revert[5]));
//                builder.setRotation(Double.valueOf(revert[6]));
//                builder.setMaxRotation2(Double.valueOf(revert[7]));
//                builder.setGearPosition2(Integer.valueOf(revert[8]));
//                builder.setSynchronisedTime2(Double.valueOf(revert[9]));
//                builder.setStartingEnergy2(Long.valueOf(revert[10]));
//                builder.setMaxRotation3(Double.valueOf(revert[11]));
//                builder.setGearPosition3(Integer.valueOf(revert[12]));
//                builder.setSynchronisedTime3(Double.valueOf(revert[13]));
//                builder.setShiftEnergy3(Long.valueOf(revert[14]));
//            }
//        }catch (Exception e){
//            e.printStackTrace();
//        }
//
//        return builder==null? null : builder.build();
//    }
//
//}
